﻿
@{
    ViewBag.Title = "EditPassWord";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<form id="form1">
    <div class="tools">
        <ul class="toolbar">
            <li class="click" onclick="fnSave()"><span><img src="../Content/UI/images/t02.png" /></span>保存</li>
        </ul>
    </div>
    <div class="formbody">
        <ul class="forminfo">
            <li>
                <label>旧密码:</label><input type="text" name="OldPassWord" class="dfinput" id="OldPassWord" required />
            </li>
            <li>
                <label>新密码:</label><input type="text" name="NewPassWord" class="dfinput" id="NewPassWord" required />
            </li>
        </ul>
    </div>
    </form>
    <script>
        function fnSave() {
            if ($('#form1').valid()) {
                $.post("../AdminUser/EditPassWord", { OldPassWord: $("#OldPassWord").val(), PassWord: $("#NewPassWord").val() }, function (result) {
                    if (result.state == 1) {
                        layer.msg('操作成功');
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index)
                        parent.$("#table").bootstrapTable('refresh');
                    }
                    else {
                        layer.msg(result.message);
                    }
                })
            }
        }
    </script>
